#pragma once
#include "DCMlicense.h"
#include "wbemidl.h"
#include <comdef.h>

#include "atlbase.h"
#include "ImLicensechecking.h"



class CDCMLicenseClient
{
public:
	CDCMLicenseClient(void);
	~CDCMLicenseClient(void);

private:
	CDCMLicense::eLicenseAppType m_CurAppType;
	IWbemServices * m_pWbemServices ;
	DWORD m_nCPUID;
	DWORD m_nBIOSID;
	DWORD m_nMainBoardID;
	DWORD m_nHardDiscID;
	DWORD m_nUID;
	DWORD m_nNICID;

	DWORD identifier(BSTR wmiClass, BSTR wmiProperty);
	int GetWMIInfo(void);

public:
	void SetApplication(CDCMLicense::eLicenseAppType app);
	BOOL Activate(char* szActivationcode, DWORD HWinfoType);

	DWORD GetCPUID() { return m_nCPUID;};
	DWORD GetBIOSID() { return m_nBIOSID;};
	DWORD GetMainBoardID() { return m_nMainBoardID;};
	DWORD GetHardDiscID() { return m_nHardDiscID;};
	DWORD GetSystemID() { return m_nUID; };
	DWORD GetNetworkCardID() { return m_nNICID;};
	void CheckLicense(int nLicID, ImLicenseChecking* pInterface);
	BOOL Register(char* szRegcode, int *sn);
};
